Skip to content

feat: use static capture for squeezenet1_1 json#639

Open
Carousel126 wants to merge 10 commits intoPaddlePaddle:developfrom
Carousel126:feat/squeezenet1_1_sample
Open

feat: use static capture for squeezenet1_1 json#639
Carousel126 wants to merge 10 commits intoPaddlePaddle:developfrom
Carousel126:feat/squeezenet1_1_sample

Conversation

@Carousel126
Copy link

PR Category

New Sample

Description

为 PaddlePaddle 后端新增了 SqueezeNet 1.1 的计算图样本,并完成了标准校验流程。主要工作如下:

  • 计算图提取:针对 PaddlePaddle 2.6+ 的 PIR (Program Intermediate Representation) 架构,通过 paddle.static.program_guard 成功捕获并导出了完整的静态计算图 JSON 文件。
  • 模型代码对齐:在 model.py 中实现了 GraphModule 包装,修复了验证脚本在执行前向推理时可能遇到的 inputs 参数缺失导致的 NoneType 报错。
  • 标准化校验
    • 通过 graph_net.paddle.validate 的完整测试。
    • 成功生成并校验源码指纹 graph_hash.txt
    • 完成前向推理一致性检查。
    • 提供完整的 input_meta.pyweight_meta.py 元数据。
  • 自动化测试:新增了 graph_net/tests/test_squeezenet1_1_extract.py,方便后续复现提取逻辑。

备注:本地验证环境为 AIStudio

@paddle-bot
Copy link

paddle-bot bot commented Feb 9, 2026

Thanks for your contribution!

@paddle-bot paddle-bot bot added the contributor External developers label Feb 9, 2026
@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Feb 27, 2026
@luotao1
Copy link
Collaborator

luotao1 commented Feb 27, 2026

请修复CodeStyle流水线

@Carousel126
Copy link
Author

请修复CodeStyle流水线

已经重新修改,请开启测试~

@Carousel126
Copy link
Author

/re-run all-failed

@Carousel126
Copy link
Author

@luotao1 可以同意我的CI重新运行吗 我已经再次提交,显示需要管理员同意~

self.model = squeezenet1_1(pretrained=False)

def forward(self, *args, **kwargs):
# 兼容性抓取:优先抓取位置参数第一个,或者关键字参数名为 'inputs' 的
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

有个小问题,model.py 应该是抓取脚本自动生成的,为什么会有中文注释呢?(另外,其它地方的中文注释最好也换成英文)

@JewelRoam
Copy link
Collaborator

paddle samples应当放在独立于samples的另一个目录,请参阅GraphNet仓库。麻烦修改一下,感谢

@Carousel126
Copy link
Author

paddle samples应当放在独立于samples的另一个目录,请参阅GraphNet仓库。麻烦修改一下,感谢

已经修改了~请老师看看是否正确谢谢!

@Carousel126
Copy link
Author

@JewelRoam 老师,那现在这个Validate问题是否需要修改呢~似乎一直是会出现这个问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor External developers HappyOpenSource 快乐开源活动issue与PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants